﻿@model List<DHQGHN.PM2.Models.InvestigationStatisticsModel>

@{ 
    var grid = new WebGrid(Model, canPage: true,
       selectionFieldName: "selectedRow");
}
<style>
    .webGrid {
        width: 100%;
        min-width: 300px;
        margin: 0px;
        margin-bottom: 0px;
    }

</style>

<div style="margin-top:10px;">
    @if (Model != null && Model.Count > 0) { 
       @grid.GetHtml(tableStyle: "statistic table table-striped table-bordered table-hover dataTable no-footer",
        headerStyle: "header", htmlAttributes: new { id = "EnumGrid" },
            fillEmptyRows: false,
            alternatingRowStyle: "", selectedRowStyle: "select",
                rowStyle: "webgrid-row-style",
                        
                columns: grid.Columns( 
                     grid.Column(
                        columnName: "STT",
                        header: "STT",
                        format: @<text>
                            <span id="spnTotal">
                                @item.STT
                            </span>
                        </text>,
                        canSort: false,
                        style: "clsSTT"
                     ),
                     grid.Column(
                        columnName: "Caption",
                        header: "Phương thức ĐT",
                        format: @<text>
                            <span id="spnTotal">
                                @item.METHOD_NAME
                            </span>
                        </text>,
                        canSort: false,
                        style: "classNameCSS"
                     ),
                    grid.Column(
                        columnName: "total",
                        header: "Tổng số",
                        format: @<text>
                            <span id="spnTotal">
                                @item.TOTAL
                            </span>
                        </text>,
                        canSort: false,
                        style: "classNameCSS"
                        ),
                    grid.Column(
                        columnName: "completed",
                        header: "Hoàn thành",
                        format: @<text>
                            <span id="spnCompleted">
                                @item.COMPLETED
                            </span>
                        </text>,
                        canSort: false,
                        style: "classNameCSS"
                        ),
                     grid.Column(
                        columnName: "waiting",
                        header: "Chưa hoàn thành",
                        format: @<text>
                            <span id="spnWaiting">
                                @item.WAITING
                            </span>
                        </text>,
                        canSort: false,
                        style: "classNameCSS"
                        )                      
              )
        )
    }
    else{
        <h3>Không tìm thấy kết quả nào.</h3>
    }
</div>
<div style="margin-top:10px; text-align:right; font-weight: bold;">
    Đơn vị: Hộ GĐ
</div>
<script type="text/javascript">
    $(function () {
        $('.clsSTT').css('text-align', 'center');        
    });
</script>
